/* eslint-disable @typescript-eslint/no-empty-object-type */

// import axios from 'axios';
import { requestClient } from '#/api/request';

export namespace RqcApi {
  export interface RqcListParams {
    pageNum: number;
    pageSize: number;
  }
  export interface Params {}
  export interface Row {
    searchValue: null;
    createBy: string;
    createTime: string;
    updateBy: string;
    updateTime: string;
    remark: string;
    params: Params;
    rqcId: number;
    rqcCode: string;
    rqcName: null | string;
    templateId: number;
    sourceDocId: number;
    sourceDocType: string;
    sourceDocCode: string;
    sourceLineId: number;
    itemId: number;
    itemCode: string;
    itemName: string;
    specification: string;
    unitOfMeasure: string;
    unitName: string;
    batchId: null;
    batchCode: string;
    quantityCheck: number;
    quantityUnqualified: number;
    quantityQualified: number;
    checkResult: string;
    inspectDate: string;
    userId: number;
    userName: string;
    nickName: string;
    status: string;
    attr1: null;
    attr2: null;
    attr3: number;
    attr4: number;
  }
  export interface RqcListResult {
    total: number;
    rows: Row[];
    code: number;
    msg: string;
  }
}

// 获取退料检验单列表
export const getRqcList = (data: RqcApi.RqcListParams) => {
  return requestClient.get<RqcApi.RqcListResult>('/mes/qc/rqc/list', {
    params: data,
  });
};
